3.299 \(\int \frac{x^2 (d+e x)}{a^2-c^2 x^2} \, dx\)

Optimal. Leaf size=63 \[ -\frac{a (a e+c d) \log (a-c x)}{2 c^4}+\frac{a (c d-a e) \log (a+c x)}{2 c^4}-\frac{d x}{c^2}-\frac{e x^2}{2 c^2} \]

[Out]

-((d*x)/c^2) - (e*x^2)/(2*c^2) - (a*(c*d + a*e)*Log[a - c*x])/(2*c^4) + (a*(c*d - a*e)*Log[a + c*x])/(2*c^4)

________________________________________________________________________________________

Rubi [A]  time = 0.0559836, antiderivative size = 63, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 3, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.13, Rules used = {801, 633, 31} \[ -\frac{a (a e+c d) \log (a-c x)}{2 c^4}+\frac{a (c d-a e) \log (a+c x)}{2 c^4}-\frac{d x}{c^2}-\frac{e x^2}{2 c^2} \]

Antiderivative was successfully verified.

[In]

Int[(x^2*(d + e*x))/(a^2 - c^2*x^2),x]

[Out]

-((d*x)/c^2) - (e*x^2)/(2*c^2) - (a*(c*d + a*e)*Log[a - c*x])/(2*c^4) + (a*(c*d - a*e)*Log[a + c*x])/(2*c^4)

Rule 801

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(
(d + e*x)^m*(f + g*x))/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && Integer
Q[m]

Rule 633

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[-(a*c), 2]}, Dist[e/2 + (c*d)/(2*q),
Int[1/(-q + c*x), x], x] + Dist[e/2 - (c*d)/(2*q), Int[1/(q + c*x), x], x]] /; FreeQ[{a, c, d, e}, x] && NiceS
qrtQ[-(a*c)]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps

\begin{align*} \int \frac{x^2 (d+e x)}{a^2-c^2 x^2} \, dx &=\int \left (-\frac{d}{c^2}-\frac{e x}{c^2}+\frac{a^2 d+a^2 e x}{c^2 \left (a^2-c^2 x^2\right )}\right ) \, dx\\ &=-\frac{d x}{c^2}-\frac{e x^2}{2 c^2}+\frac{\int \frac{a^2 d+a^2 e x}{a^2-c^2 x^2} \, dx}{c^2}\\ &=-\frac{d x}{c^2}-\frac{e x^2}{2 c^2}-\frac{(a (c d-a e)) \int \frac{1}{-a c-c^2 x} \, dx}{2 c^2}+\frac{(a (c d+a e)) \int \frac{1}{a c-c^2 x} \, dx}{2 c^2}\\ &=-\frac{d x}{c^2}-\frac{e x^2}{2 c^2}-\frac{a (c d+a e) \log (a-c x)}{2 c^4}+\frac{a (c d-a e) \log (a+c x)}{2 c^4}\\ \end{align*}

Mathematica [A]  time = 0.0123887, size = 56, normalized size = 0.89 \[ -\frac{a^2 e \log \left (a^2-c^2 x^2\right )}{2 c^4}+\frac{a d \tanh ^{-1}\left (\frac{c x}{a}\right )}{c^3}-\frac{d x}{c^2}-\frac{e x^2}{2 c^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(x^2*(d + e*x))/(a^2 - c^2*x^2),x]

[Out]

-((d*x)/c^2) - (e*x^2)/(2*c^2) + (a*d*ArcTanh[(c*x)/a])/c^3 - (a^2*e*Log[a^2 - c^2*x^2])/(2*c^4)

________________________________________________________________________________________

Maple [A]  time = 0.006, size = 78, normalized size = 1.2 \begin{align*} -{\frac{e{x}^{2}}{2\,{c}^{2}}}-{\frac{dx}{{c}^{2}}}-{\frac{{a}^{2}\ln \left ( cx+a \right ) e}{2\,{c}^{4}}}+{\frac{a\ln \left ( cx+a \right ) d}{2\,{c}^{3}}}-{\frac{{a}^{2}\ln \left ( cx-a \right ) e}{2\,{c}^{4}}}-{\frac{a\ln \left ( cx-a \right ) d}{2\,{c}^{3}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(e*x+d)/(-c^2*x^2+a^2),x)

[Out]

-1/2*e*x^2/c^2-d*x/c^2-1/2/c^4*a^2*ln(c*x+a)*e+1/2/c^3*a*ln(c*x+a)*d-1/2/c^4*a^2*ln(c*x-a)*e-1/2/c^3*a*ln(c*x-
a)*d

________________________________________________________________________________________

Maxima [A]  time = 1.04531, size = 82, normalized size = 1.3 \begin{align*} -\frac{e x^{2} + 2 \, d x}{2 \, c^{2}} + \frac{{\left (a c d - a^{2} e\right )} \log \left (c x + a\right )}{2 \, c^{4}} - \frac{{\left (a c d + a^{2} e\right )} \log \left (c x - a\right )}{2 \, c^{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(e*x+d)/(-c^2*x^2+a^2),x, algorithm="maxima")

[Out]

-1/2*(e*x^2 + 2*d*x)/c^2 + 1/2*(a*c*d - a^2*e)*log(c*x + a)/c^4 - 1/2*(a*c*d + a^2*e)*log(c*x - a)/c^4

________________________________________________________________________________________

Fricas [A]  time = 1.62095, size = 130, normalized size = 2.06 \begin{align*} -\frac{c^{2} e x^{2} + 2 \, c^{2} d x -{\left (a c d - a^{2} e\right )} \log \left (c x + a\right ) +{\left (a c d + a^{2} e\right )} \log \left (c x - a\right )}{2 \, c^{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(e*x+d)/(-c^2*x^2+a^2),x, algorithm="fricas")

[Out]

-1/2*(c^2*e*x^2 + 2*c^2*d*x - (a*c*d - a^2*e)*log(c*x + a) + (a*c*d + a^2*e)*log(c*x - a))/c^4

________________________________________________________________________________________

Sympy [A]  time = 0.593743, size = 88, normalized size = 1.4 \begin{align*} - \frac{a \left (a e - c d\right ) \log{\left (x + \frac{a^{2} e - a \left (a e - c d\right )}{c^{2} d} \right )}}{2 c^{4}} - \frac{a \left (a e + c d\right ) \log{\left (x + \frac{a^{2} e - a \left (a e + c d\right )}{c^{2} d} \right )}}{2 c^{4}} - \frac{d x}{c^{2}} - \frac{e x^{2}}{2 c^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(e*x+d)/(-c**2*x**2+a**2),x)

[Out]

-a*(a*e - c*d)*log(x + (a**2*e - a*(a*e - c*d))/(c**2*d))/(2*c**4) - a*(a*e + c*d)*log(x + (a**2*e - a*(a*e +
c*d))/(c**2*d))/(2*c**4) - d*x/c**2 - e*x**2/(2*c**2)

________________________________________________________________________________________

Giac [A]  time = 1.16154, size = 97, normalized size = 1.54 \begin{align*} \frac{{\left (a c d - a^{2} e\right )} \log \left ({\left | c x + a \right |}\right )}{2 \, c^{4}} - \frac{{\left (a c d + a^{2} e\right )} \log \left ({\left | c x - a \right |}\right )}{2 \, c^{4}} - \frac{c^{2} x^{2} e + 2 \, c^{2} d x}{2 \, c^{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(e*x+d)/(-c^2*x^2+a^2),x, algorithm="giac")

[Out]

1/2*(a*c*d - a^2*e)*log(abs(c*x + a))/c^4 - 1/2*(a*c*d + a^2*e)*log(abs(c*x - a))/c^4 - 1/2*(c^2*x^2*e + 2*c^2
*d*x)/c^4